﻿namespace FiftyOne.Foundation.Mobile.Detection.Wurfl.Handlers
{
    using System;

    internal class SonyEricssonHandler : RegexSegmentHandler
    {
        private static readonly string[] PATTERNS = new string[] { "(?:(?<=SonyEricsson)[^/]+)", @"(?:(?<=SonyEricsson[^/]+/)[\w\d]+)", "(?:(?<= )[^ ]+)" };

        internal SonyEricssonHandler() : base(PATTERNS, new int[] { 100, 1, 1 }, true)
        {
        }

        protected internal override bool CanHandle(string userAgent)
        {
            return (userAgent.Contains("SonyEricsson") && base.CanHandle(userAgent));
        }
    }
}

